<?php

include_once(dirname(__FILE__)."/../lib/auth.php");
include_once dirname(__FILE__)."/../lib/rlogin.php";
include_once "sajax.php";
//$_start = microtime();
// --- [ Start ] --------------------------------------------------------------

include_once dirname(__FILE__)."/../lib/core.class.php";
include_once dirname(__FILE__)."/rframework.php";
include_once dirname(__FILE__)."/actions_ajax.php";

$frm =& new ResellersFramework();

$core = getCoreInstance();

$core->setFramework($frm);
$core = getCoreInstance();
$core->initialize();



$GLOBALS['db']=&$core->getProperty("db");

                    switch ($_GET['path'])
                    {
                        case "discounts_type" :
                            sajax_init();
                            sajax_export("GetListDiscounts");
                            sajax_handle_client_request();
                            break;
                    
                        case "discounts_type,discounts" :
                            sajax_init();
                            sajax_export("GetListProducts");
                            sajax_handle_client_request();
                            break;
                    
                        case "orderslist,productlist" :
                            sajax_init();
                            sajax_export("GetListProducts");
                            sajax_handle_client_request();
                            break;
                    }

$core->doAction();
echo $core->render();
$core->shutdown();
unset($core);

?>